<?php
class UaObject{
	/**
	 * get the mysql version
	 *
	 * @return Mysql version.
	 */
	function getMysqlVersion()
	{
		global $g_db;
		$v = $g_db->GetOne("SELECT VERSION()");
		return $v;
	}

	function writeCache($filename, $inputstr, $extra = "w")
	{
	    $handle = fopen($filename, $extra);
	    if (!$handle) {
	    	return false;
	    }else{
	        $writed = fwrite($handle, $inputstr);
	        if (!$writed) {
	        	return false;
	        }
	    }
	    @fclose($handle);
	    return true;
	}
}
?>